Component({
  data:{
    bookInfo:{}
  },
  methods:{
    onLoad(options:any){
      console.log(options)
      const data=options.id
      wx.request({
        url: `https://api.douban.com/v2/book/isbn/:${data}`,
        method: 'GET',
        data: { apiKey: '0ac44ae016490db2204ce0a042db2916' },
        header: { 'Content-Type': 'json' },
        success: (res) => {
          console.log(res.data)
          // const param = { title: res.data.title, author: res.data.author, cover: res.data.images.small,isbn:data }
          this.setData({bookInfo:res.data})
        },
        fail: (err) => console.error(err)
      });
    }
  }
})